#!/bin/sh
CUR_PATH=`dirname $(readlink -f $0)`
PKG_NAME=svc-sample_`date +'%Y%m%d%H%M%S'`
PKG_DIR=${CUR_PATH}/install/${PKG_NAME}

make clean
make
mkdir -p "${PKG_DIR}"

cp -rf "${CUR_PATH}/install/resource/"* "${PKG_DIR}/"
cp -f "${CUR_PATH}/svc" "${PKG_DIR}/svc-sample/"

cd "${CUR_PATH}/install/"
rm -rf *.zip
zip -r "${PKG_NAME}.zip" "${PKG_NAME}/"
rm -rf "${PKG_DIR}/"
